package com.eliza.music.view.video.mine

import android.graphics.Color
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil.compose.rememberAsyncImagePainter
import com.eliza.library.utils.compose.ImageBuild
import com.eliza.music.model.tmp.ResAvatar

@Preview(showBackground = true, backgroundColor = Color.WHITE.toLong())
@Composable
private fun MineShow() {
    Mine.Index()
}

object Mine {

    @Composable
    fun Index(modifier: Modifier = Modifier) {
        TopTitle()
    }

    @Composable
    fun TopTitle() {
        Row {
            Image(
                modifier = Modifier
                    .size(250.dp)
                    .clip(CircleShape),
                painter = rememberAsyncImagePainter(
                    model = ImageBuild.CoilImageRequest(
                        LocalContext.current,
                        ResAvatar.random()
                    )
                ), contentDescription = "",
                contentScale = ContentScale.Crop
            )
            Column {
                Text(text = "大萌新在此")
                Text(text = "正式会员")
                Text(text = "B币：")
                Text(text = "硬币：")
            }
        }
    }
}